#导包
import requests

name=input('请输入要搜索的值')
url="https://user.qzone.qq.com/2407712524"

head={
'Cookie':'RK=tKPBUIUXzu; ptcz=89a988047251f382eedeb77a4f379f9580546b19b11bf917461750a40fe8e4b3; eas_sid=n1q743q6Y5n1Y365q9h7b2S7U4; pgv_pvid=223148224; _qpsvr_localtk=0.8942984796243865; pgv_info=ssid=s4345168771; uin=o2407712524; skey=@3KE0DLQ7x; p_uin=o2407712524; pt4_token=172bXTQ3xxTQ-L-4n2e-l0MCX3uzBQAUlrIN7wbZCP8_; p_skey=0YXKUm43W36wXvxaOpsz5xOVpm79u**ritlEa-y0AkE_; Loading=Yes; qz_screen=1536x864; 2407712524_todaycount=0; 2407712524_totalcount=1240; QZ_FE_WEBP_SUPPORT=1; cpu_performance_v8=0; qqmusic_uin=2407712524; qqmusic_key=@3KE0DLQ7x; qqmusic_fromtag=6; qzmusicplayer=qzone_player_2407712524_1736519357922',
'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'
}
data=requests.get(url,headers=head)
data.encoding='utf-8'
with open('qq空间.html','w',encoding='utf-8') as f:
    f.write(data.text)

